Given the same sensory information, we generate different responses in different situations, depending on our goal, task rule, etc. This flexibilit is a hallmark of cognition and involves gated routing of information flow in the brain circuitry, the underlying mechanism remains largely mysterious. The overarching objective of the proposed research is to elucidate computational principles and circuit basis of gated computation and flexible sensori-motor mapping in decision-making. I propose that gating is accomplished by four complementary mechanisms: (a) tunable dendritic inhibition by a subclass of GABAergic neurons for input gating, (b) pathway-specific excitation-inhibition balance for processing in discrete stages, (c) top-down signaling from rule representation for network selection, (d) a STOP process for inhibitory control of automatic response. I will rigorously investigate these mechanisms in biologically based circuit models, in collaboration with experimentalists who are carrying out single-neuron physiological experiments in which monkeys perform flexible visuo-motor tasks. In a paradigmatic task of controlled action, the appropriate response to a sensory target is to either shift the gaze toward it (pro-saccade) or away from it (anti-saccade) depending on task context. In colored-target tasks, a perceptual decision about an ambiguous stimulus or a probabilistic inference based on sensory cues must be made, before the subject knows when and how the decision will be used to guide action selection. Our model will be tested by quantitatively reproducing single-neuron activity data as well as behavioral performance, and uncovering the underlying circuit mechanisms that will be testable in new experiments. In Aim 1, I will examine circuit mechanisms for gating, including input-specific dendritic inhibition and the idea of pathway-specific excitation-inhibition balance. Aim 2 will be devoted to rule-based action selection, by developing a detailed circuit model of the pro-/anti-saccade task. In Aim 3, I will examine gated neural dynamics when perceptual decision and action selection are temporally separated. We will build spiking network models for versions of the random dot motion direction discrimination task and weather prediction task. The pro-/anti-saccade and colored-target visuo-motor tasks all depend on flexible routing of information from a sensory decision circuit to an action selection circuit, which confers a strong cohesiveness to this application. This research program will shed insights into complex dynamics of neurons endowed with mixed selectivity that underlie adaptive coding in flexible behavior.